<?php

require 'Student.php';
require 'Courses.php';
require 'Teacher.php';

$s1 = new Student(1,'老王',36,1);
$s2 = new Student(2,'魑魅魍魉',23,1);

$c1 = new Courses(1, '计算机语言' , 20 , '计算机' );
$c2 = new Courses(2, 'go die' , 30 , 'siwang' );
$c3 = new Courses(3, '线性代数' , 40 , '理工' );
$c4 = new Courses(4, 'c++' , 50 , '计算机' );

$t1 = new Teacher(1,'张老师','计算机专业');
$t1->addCourse($c1);
$t1->addCourse($c4);

//$t1->introduce();

$courses = $c1->teacher->course;
    foreach ($courses as $c) {
    	echo $c;
    }


/*
$s1->addCourse($c1);
$s1->addCourse($c2);
$s1->addCourse($c3);

$s2->addCourse($c3);
$s2->addCourse($c4);

$s1->study();
$s2->study();

echo '有人要退选课程';

$s1->removeCourse(3);

$s1->study();
$s2->study();*